package com.vlin.mapper.family;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import com.vlin.entity.family.Family;

public interface FamilyMapper {

	@Insert("insert into family(name,uid,enabled) values(#{name},#{uid},#{enabled})")
	public int addFamily(Family family);
	
	@Update("update family set name=#{name} where fid=#{fid}")
	public int updateFamilyName(@Param("name") String name, @Param("fid") int fid);
	
	@Delete("delete from family where fid=#{fid}")
	public int deleteFamily(@Param("fid") int fid);
}
